﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Needle.Simulation;

namespace Needle.Simulation
{
    public class Tocker : Process
    
    {

        private string _mesg="Tock";

        public Tocker()
        { }

        public Tocker(string mesg)
        {
            _mesg = mesg;
        }

        protected override IEnumerable<Task> ProcessDefinition()
        {
            while (true)
            {
                yield return WaitEvent("Tick");
                Log(_mesg);
            }
        }
    }
}
